package com.ymttest.common.enums;

/**
 * 优惠券来源枚举
 */
public enum CouponSourceTypeEnum {
	/**
	 * 码头主站
	 */
	Matou(1),

	/**
	 * 商铺
	 */
	Shop(2),

	/**
	 * 店铺
	 */
	MShop(3);

	private int intValue;
	private static java.util.HashMap<Integer, CouponSourceTypeEnum> mappings;

	private synchronized static java.util.HashMap<Integer, CouponSourceTypeEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, CouponSourceTypeEnum>();
		}
		return mappings;
	}

	private CouponSourceTypeEnum(int value) {
		intValue = value;
		CouponSourceTypeEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static CouponSourceTypeEnum forValue(int value) {
		return getMappings().get(value);
	}
}